package com.py.credit.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.py.credit.entity.ConcernedSubject;
import com.py.framework.core.common.Page;

public interface ConcernedSubjectDao {

	int deleteByPrimaryKey(Integer id);

	int insertSelective(ConcernedSubject record);

	/**
	 * @param name
	 * @return
	 */
	int selectUnqiueByName(@Param(value = "name") String name);

	/**
	 * @param userId
	 * @param showColumns
	 * @param additionalColumns
	 * @param conditions
	 * @param page
	 * @return
	 */
	List<Map<String, Object>> selectByConditionForPage(@Param(value = "userId") Long userId,
			@Param(value = "columns") List<String> showColumns,
			@Param(value = "additionalColumns") String[] additionalColumns,
			@Param(value = "conditions") List<String> conditions, @Param(value = "page") Page page);

	/**
	 * @param name
	 * @return
	 */
	List<String> selectUniqueByName(@Param(value = "name") String name);

	/**
	 * @return
	 */
	List<Map<String, Integer>> selectSubjectChangedSubscriber();

	/**
	 * @param id
	 * @param recordId
	 * @param resourceId
	 */
	void addNewRecord(@Param(value = "id") int id, @Param(value = "recordId") int recordId,
			@Param(value = "resourceId") String resourceId);

	/**
	 * @param checkStatus
	 * @param modifyTime
	 */
	void updateCheckStatus(@Param(value = "checkStatus") String checkStatus, @Param(value = "id") int id,
			@Param(value = "modifyTime") String modifyTime);

	/**
	 * @param pushStatus
	 * @param changedSubject
	 */
	void updatePushStatus(@Param(value = "pushStatus") String pushStatus,
			@Param(value = "list") List<Map<String, Integer>> changedSubject);

	/**
	 * @param subjectName
	 * @param userid
	 * @return
	 */
	int selectCount(@Param(value = "subjectName") String subjectName, @Param(value = "userId") Long userId);

}